<template>
  <div class="app-container">
    <CommonTable ref="commonTable" :qo="qo" :baba="this">
      <!-- 查询参数 -->
      <template slot="filterItems">
        <el-form-item label="配置编码" prop="code">
          <el-input v-model.trim="qo.code" clearable />
        </el-form-item>
        <el-form-item label="配置描述" prop="description">
          <el-input v-model.trim="qo.description" clearable />
        </el-form-item>
      </template>
      <!-- 列表头 -->
      <template slot="column">
        <el-table-column label="配置编码" prop="code" />
        <el-table-column label="配置描述" prop="description" />
        <el-table-column label="配置值" prop="val" />
        <el-table-column label="创建日期" prop="dateCreated" />
        <el-table-column label="修改日期" prop="lastUpdated" />
      </template>
    </CommonTable>
    <Form ref="form" />
  </div>
</template>

<script>
import { list } from '@/api/system/config'
import Form from './form'
import CommonTable from '@/components/CommonTable'
export default {
  name: 'Config',
  components: { CommonTable, Form },
  data() {
    return {
      qo: { code: '', description: '' }
    }
  },
  created() {
  },
  methods: {
    getData(qoPro) {
      return list(qoPro)
    },
    create() {
      this.$refs.form.createOpen()
    },
    update(row) {
      this.$refs.form.updateOpen(row.id)
    }
  }
}
</script>
